home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / msdos / lynx / source / www / library / implemen / htalert.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-25  |  3.1 KB  |  119 lines

  1. /*                                                  HTAlert: Handling user messages in libwww
  2.                   DISPLAYING MESSAGES AND GETTING INPUT FOR WWW LIBRARY
  3.                                              
  4.    This module may be overridden for GUI clients.    It allows progress indications and
  5.    warning messages to be communicated to the user in a portable way.  It should be used
  6.    for this purpose throughout the library but isn't yet (July 93)
  7.    
  8.       May 92 Created By C.T. Barker
  9.       
  10.       Feb 93 Portablized etc TBL
  11.       
  12.  */
  13. #include "HTUtils.h"
  14. #include "tcp.h"
  15.  
  16. #ifdef SHORT_NAMES
  17. #define HTPrPass        HTPromptPassword
  18. #define HTPUnAPw        HTPromptUsernameAndPassword
  19. #endif /*SHORT_NAMES*/
  20.  
  21. /*
  22.  
  23. HTPrompt and HTPromptPassword: Display a message and get the input
  24.  
  25.    HTPromptPassword() doesn't echo reply on the screen.
  26.    
  27.   ON ENTRY,
  28.   
  29.   Msg                     String to be displayed.
  30.                          
  31.   deflt                   If NULL the default value (only for HTPrompt())
  32.                          
  33.   ON EXIT,
  34.   
  35.   Return value            is malloc'd string which must be freed.
  36.                          
  37.  */
  38.                 
  39. extern char * HTPrompt PARAMS((CONST char * Msg, CONST char * deflt));
  40. extern char * HTPromptPassword PARAMS((CONST char * Msg));
  41.  
  42. /*
  43.  
  44. HTPromptUsernameAndPassword: Get both username and password
  45.  
  46.   ON ENTRY,
  47.   
  48.   Msg                    String to be displayed.
  49.                          
  50.   username                Pointer to char pointer, i.e. *usernamepoints to a string.  If
  51.                          non-NULL it is taken to be a default value.
  52.                          
  53.   password                Pointer to char pointer, i.e. *passwordpoints to a string.
  54.                          Initial value discarded.
  55.                          
  56.   ON EXIT,
  57.   
  58.   *username               and
  59.                          
  60.   *password               point to newly allocated strings representing the typed-in
  61.                          username and password.  Initial strings pointed to by them are
  62.                          NOT freed!
  63.                          
  64.  */
  65.  
  66. extern void HTPromptUsernameAndPassword PARAMS((CONST char *    Msg,
  67.                                                 char **         username,
  68.                                                 char **         password));
  69.  
  70. /*
  71.  
  72. Display a message, don't wait for input
  73.  
  74.   ON ENTRY,
  75.   
  76.   Msg                     String to be displayed.
  77.                          
  78.  */
  79.  
  80. extern void HTAlert PARAMS((CONST char * Msg));
  81.  
  82.  
  83. /*
  84.  
  85. Display a progress message for information (and diagnostics) only
  86.  
  87.   ON ENTRY,
  88.   
  89.    The input is a list of parameters for printf.
  90.    
  91.  */
  92. extern void HTProgress PARAMS((CONST char * Msg));
  93.  
  94.  
  95. /*
  96.  
  97. Display a message, then wait for 'yes' or 'no'.
  98.  
  99.   ON ENTRY,
  100.   
  101.   Msg                     String to be displayed
  102.                          
  103.   ON EXIT,
  104.   
  105.   Returns                 If the user reacts in the affirmative, returns TRUE, returns
  106.                          FALSE otherwise.
  107.                          
  108.  */
  109.  
  110. extern BOOL HTConfirm PARAMS ((CONST char * Msg));
  111.  
  112.  
  113.  
  114.  
  115.  
  116. /*
  117.  
  118.     */
  119.